package com.xiaoxiong.gobang.bean;

import android.util.Log;

/**
 * @author xiaoxiong
 * @Package com.xiaoxiong.gobang.bean
 * @Description:
 * @email 249900679@qq.com
 * @date 2016/4/2 0:10
 */
public class HumanPlayer extends Player {
    private int pos;
    private boolean isPlay;

    public HumanPlayer(String name) {
        super(name);
        this.pos = -1;
        this.isPlay = false;
    }

    @Override
    public int GetNextPosition() {
        this.isPlay = true;
        while (this.pos == -1) {
        }
        int p = this.pos;
        this.pos = -1;
        this.isPlay = false;
        return p;
    }

    public int getPos() {
        return pos;
    }

    public void setPos(int pos) {
        if (this.isPlay) {
            this.pos = pos;
        }
    }
}
